package com.wlyuan.open.utils;

import java.math.BigDecimal;
import java.util.Optional;

/**
 * @author lijing
 * @description
 */
public class LongUtils {

    public static boolean notNullLong(Long val) {
        return Optional.ofNullable(val).map(x -> x > 0).orElse(false);
    }

    public static boolean notNullInteger(Integer val) {
        return Optional.ofNullable(val).map(x -> x > 0).orElse(false);
    }

    public static boolean notNullDecimal(BigDecimal val) {
        return Optional.ofNullable(val).map(x -> x.compareTo(BigDecimal.ZERO) > 0).orElse(false);
    }

}
